home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1988 / Feb 88 / Re-MDEF&OPCODE 2⁄23 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.0 KB  |  27 lines  |  [TEXT/GEOL]

  1. Item    1486266                         23-Feb-88        12:59
  2.  
  3. From:   X0501                           MacApp Developers Assoc, C. Nelson
  4.  
  5. To:     D0756                           Tradenet, Dev, Adam Wildavsky
  6.  
  7. cc:     MACAPP$                         MacApp Interest List
  8.  
  9. Sub:    Re:MDEF&OPCODE
  10.  
  11. Adam,
  12.  
  13. oops, As for you question about the JMP record and OPCODE $4EF9, if you read IM
  14. volI pg 362, MDEFs are code which is executed.  In order to get back into
  15. MacApp, Larry generates, at run time, a handle to a small piece of glue code
  16. $4EF9 (JMP IMMEDIATE using the next LONG WORD (@MenuDefproc) as the address to
  17. which you are supposed to JMP).The handle is stored in a global variable
  18. gCustDefproc. When IMenu is called, it installs (m^^.menuProc :=gCustDefproc;)
  19. in the procdef field for our menu. When the Mac sees our menu is selected it
  20. calls our MDEF. The MDEF JMPs to MenuDefProc which does the dispatching to the
  21. appropriate TMENU Menu Object.
  22.  
  23. (Is this clear?  Did I get it right Larry?)
  24.  
  25.                                                         ....Carl
  26.  
  27.